# -*- coding: utf-8 -*-
"""
Created on Tue Apr 23 20:05:57 2019

@author: yaoyu
"""

import numpy as np

a = np.arange(15).reshape(3, 5)
print(a)
print(np.sum(a))

print(1, np.mean(a,axis=1))
print(0, np.mean(a,axis=0))

print(np.average(a, axis=0, weights=[10,5,1]))
print(np.average(a, axis=0))

print(np.std(a))


b = np.arange(15,0,-1).reshape(3,5)
print(b)
print(np.max(b))
print(np.argmax(b))
print(np.unravel_index(np.argmax(b),b.shape))